package com.example.controller;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author xielei
 * @date 2022/6/20 21:28
 */
@Controller
public class HelloController {

    @RequestMapping("/hello.do")
    public String hello(HttpServletRequest request, HttpServletResponse response) {
        Cookie cookie = new Cookie("msisdn", "12395885474");
        response.addCookie(cookie);
        return "main";
    }

    @RequestMapping("/my")
    public String my() {
        return "my";
    }
}
